Optimal. Leaf size=92 \[ -\frac {15 c^3 x}{2 a}-\frac {15 c^3 \cos (e+f x)}{2 a f}-\frac {2 a^2 c^3 \cos ^5(e+f x)}{f (a+a \sin (e+f x))^3}-\frac {5 c^3 \cos ^3(e+f x)}{2 f (a+a \sin (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {2815, 2759,
2758, 2761, 8} \begin {gather*} -\frac {2 a^2 c^3 \cos ^5(e+f x)}{f (a \sin (e+f x)+a)^3}-\frac {15 c^3 \cos (e+f x)}{2 a f}-\frac {5 c^3 \cos ^3(e+f x)}{2 f (a \sin (e+f x)+a)}-\frac {15 c^3 x}{2 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2758
Rule 2759
Rule 2761
Rule 2815
Rubi steps
\begin {align*} \int \frac {(c-c \sin (e+f x))^3}{a+a \sin (e+f x)} \, dx &=\left (a^3 c^3\right ) \int \frac {\cos ^6(e+f x)}{(a+a \sin (e+f x))^4} \, dx\\ &=-\frac {2 a^2 c^3 \cos ^5(e+f x)}{f (a+a \sin (e+f x))^3}-\left (5 a c^3\right ) \int \frac {\cos ^4(e+f x)}{(a+a \sin (e+f x))^2} \, dx\\ &=-\frac {2 a^2 c^3 \cos ^5(e+f x)}{f (a+a \sin (e+f x))^3}-\frac {5 c^3 \cos ^3(e+f x)}{2 f (a+a \sin (e+f x))}-\frac {1}{2} \left (15 c^3\right ) \int \frac {\cos ^2(e+f x)}{a+a \sin (e+f x)} \, dx\\ &=-\frac {15 c^3 \cos (e+f x)}{2 a f}-\frac {2 a^2 c^3 \cos ^5(e+f x)}{f (a+a \sin (e+f x))^3}-\frac {5 c^3 \cos ^3(e+f x)}{2 f (a+a \sin (e+f x))}-\frac {\left (15 c^3\right ) \int 1 \, dx}{2 a}\\ &=-\frac {15 c^3 x}{2 a}-\frac {15 c^3 \cos (e+f x)}{2 a f}-\frac {2 a^2 c^3 \cos ^5(e+f x)}{f (a+a \sin (e+f x))^3}-\frac {5 c^3 \cos ^3(e+f x)}{2 f (a+a \sin (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.34, size = 155, normalized size = 1.68 \begin {gather*} \frac {c^3 \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) (-1+\sin (e+f x))^3 \left (\sin \left (\frac {1}{2} (e+f x)\right ) (-64+30 e+30 f x+16 \cos (e+f x)-\sin (2 (e+f x)))+\cos \left (\frac {1}{2} (e+f x)\right ) (30 (e+f x)+16 \cos (e+f x)-\sin (2 (e+f x)))\right )}{4 a f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^6 (1+\sin (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.31, size = 96, normalized size = 1.04
method | result | size |
derivativedivides | \(\frac {2 c^{3} \left (-\frac {8}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {\frac {\left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+4 \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2}+4}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}-\frac {15 \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}\right )}{f a}\) | \(96\) |
default | \(\frac {2 c^{3} \left (-\frac {8}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {\frac {\left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+4 \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2}+4}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}-\frac {15 \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}\right )}{f a}\) | \(96\) |
risch | \(-\frac {15 c^{3} x}{2 a}-\frac {2 c^{3} {\mathrm e}^{i \left (f x +e \right )}}{a f}-\frac {2 c^{3} {\mathrm e}^{-i \left (f x +e \right )}}{a f}-\frac {16 c^{3}}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}+\frac {c^{3} \sin \left (2 f x +2 e \right )}{4 a f}\) | \(96\) |
norman | \(\frac {-\frac {7 c^{3}}{a f}+\frac {10 c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}+\frac {17 c^{3} \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}-\frac {5 c^{3} \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}+\frac {35 c^{3} \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}-\frac {15 c^{3} x}{2 a}-\frac {15 c^{3} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 a}-\frac {45 c^{3} x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}-\frac {45 c^{3} x \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}-\frac {45 c^{3} x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}-\frac {45 c^{3} x \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}-\frac {15 c^{3} x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}-\frac {15 c^{3} x \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}-\frac {12 c^{3} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}+\frac {42 c^{3} \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{3} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}\) | \(319\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 462 vs.
\(2 (91) = 182\).
time = 0.54, size = 462, normalized size = 5.02 \begin {gather*} -\frac {c^{3} {\left (\frac {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {5 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {3 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + 4}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {2 \, a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {2 \, a \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {a \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac {a \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}} + \frac {3 \, \arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a}\right )} + 6 \, c^{3} {\left (\frac {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 2}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {a \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}} + \frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a}\right )} + 6 \, c^{3} {\left (\frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a} + \frac {1}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )} + \frac {2 \, c^{3}}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.32, size = 136, normalized size = 1.48 \begin {gather*} -\frac {c^{3} \cos \left (f x + e\right )^{3} + 15 \, c^{3} f x + 8 \, c^{3} \cos \left (f x + e\right )^{2} + 16 \, c^{3} + {\left (15 \, c^{3} f x + 23 \, c^{3}\right )} \cos \left (f x + e\right ) + {\left (15 \, c^{3} f x - c^{3} \cos \left (f x + e\right )^{2} + 7 \, c^{3} \cos \left (f x + e\right ) - 16 \, c^{3}\right )} \sin \left (f x + e\right )}{2 \, {\left (a f \cos \left (f x + e\right ) + a f \sin \left (f x + e\right ) + a f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 1170 vs.
\(2 (85) = 170\).
time = 2.30, size = 1170, normalized size = 12.72 \begin {gather*} \begin {cases} - \frac {15 c^{3} f x \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{2 a f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f} - \frac {15 c^{3} f x \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{2 a f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f} - \frac {30 c^{3} f x \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{2 a f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f} - \frac {30 c^{3} f x \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{2 a f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f} - \frac {15 c^{3} f x \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{2 a f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f} - \frac {15 c^{3} f x}{2 a f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f} - \frac {34 c^{3} \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{2 a f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f} - \frac {18 c^{3} \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{2 a f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f} - \frac {78 c^{3} \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{2 a f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f} - \frac {14 c^{3} \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{2 a f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f} - \frac {48 c^{3}}{2 a f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 4 a f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 2 a f} & \text {for}\: f \neq 0 \\\frac {x \left (- c \sin {\left (e \right )} + c\right )^{3}}{a \sin {\left (e \right )} + a} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.47, size = 117, normalized size = 1.27 \begin {gather*} -\frac {\frac {15 \, {\left (f x + e\right )} c^{3}}{a} + \frac {32 \, c^{3}}{a {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}} + \frac {2 \, {\left (c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 8 \, c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 8 \, c^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )}^{2} a}}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.71, size = 216, normalized size = 2.35 \begin {gather*} \frac {\frac {15\,c^3\,\left (e+f\,x\right )}{2}+\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (\frac {15\,c^3\,\left (e+f\,x\right )}{2}-\frac {c^3\,\left (15\,e+15\,f\,x+14\right )}{2}\right )-\frac {c^3\,\left (15\,e+15\,f\,x+48\right )}{2}+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {15\,c^3\,\left (e+f\,x\right )}{2}-\frac {c^3\,\left (15\,e+15\,f\,x+34\right )}{2}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (15\,c^3\,\left (e+f\,x\right )-\frac {c^3\,\left (30\,e+30\,f\,x+18\right )}{2}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (15\,c^3\,\left (e+f\,x\right )-\frac {c^3\,\left (30\,e+30\,f\,x+78\right )}{2}\right )}{a\,f\,\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+1\right )\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}^2}-\frac {15\,c^3\,x}{2\,a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________